package org.lql.chaos.rocketmq.service.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author: liangqinglong
 * @date: 2025-08-17 00:40
 * @description: 事务消息消费者
 **/
@Slf4j
@Service
@RocketMQMessageListener(
        topic = "test-topic",
        consumerGroup = "transaction-consumer-group",
        selectorExpression = "transaction"
)
public class TransactionConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("接收到事务消息: {}", message);
        // 处理事务消息逻辑
    }
}